﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Duckbill
{
    class LoadingState : BaseState
    {
        public static float percent = 0f;
        public Sprite box;

        public LoadingState()
        {
            percent = 0f;
            box = GameObject.loadedSprites["null"];
        }

        public override void Update(float time) { }
        public override void Draw(SpriteBatch batch)
        {
            Vector2 drawPos = new Vector2(100, 100);

            box.color = Color.Black;
            //Sprite.drawColor = Color.Black;
            box.size = new Vector2(400, 100);
            box.Draw(batch, drawPos);

            box.color = Color.Green;
            //Sprite.drawColor = Color.Green;
            box.size.X = 400*percent;
            box.Draw(batch, drawPos, 0, 0);

            Sprite.drawColor = Color.White;
        }
    }
}
